<?php
namespace app\index\service;
use Wx\Wechat;
class Share 
{

    public static function WechatShare($value='')
    {
        $wxData = [];
		$wxData['app_id'] = config('wx.app_id');
		$wxData['app_secret'] = config('wx.app_secret');
        $wxData['url'] = request()->url(true);
        $wxData['imgurl'] = request()->domain().'/static/img/login-logo.png';
        $wechatObj = Wechat::instance(config('wx.app_id'), config('wx.app_secret'));
        $wechatData = $wechatObj->shareWechat($wxData['url']);
        
        return array_merge($wxData,$wechatData);
    }
}
 